package Work1;
import java.util.Random;

public class judgenumber {
	public static void main(String[] args) {
		Random rd = new Random();
		int num = rd.nextInt(100);
		int isz=0;
		System.out.println("生成的数是:"+num);

		for(int i=1;i<=num;i++) {
			if(num%i==0&&(i!=1&&i!=num)) {
				isz=1;
			}
		}
		if(isz==1) {
			System.out.println(num+"不是质数");
		}else {
			System.out.println(num+"是质数");
		}
		
		if(num%2!=0) {
			System.out.println(num+"不是偶数");
		}else {
			System.out.println(num+"是偶数");
		}
		
		if(num%3!=0) {
			System.out.println(num+"不是3的倍数");
		}else {
			System.out.println(num+"是3的倍数");
		}
	}
}
